home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / oldfix.cpp < prev    next >
Text File  |  1996-03-08  |  18KB  |  638 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <conio.h>
  5.  
  6. #include "euro_fxd.h"
  7. #include "euro.equ"
  8. #include "euro_sym.h"
  9. #include "euro_def.h"
  10. #include "euro_var.h"
  11. #include "euro_grf.h"
  12. #include "euro_dsk.h"
  13. #include "euro_cnt.h"
  14. #include "euro_gen.h"
  15. #include "euro_rnd.h"
  16. #include "defines.h"
  17.  
  18. //********************************************************************************************************************************
  19.  
  20. void    DisplayRedrawButton( char Match )
  21.     {
  22.          if ( Match == 0 )
  23.         {
  24.             RedrawHandle        =     AddAnimation( 507, 180, 
  25.                              ( (float)WHT_BLUE_BUTTON ), ( (float)WHT_BLUE_BUTTON+11.9 ),
  26.                              0.0, REDRAW_BOX, CONT_ANIM );
  27.             RedrawHighlight        =      ControlOptionHighlight( -1, REDRAW_BOX, REDRAWdisp_BOX, 
  28.                              -1, RedrawHandle, BUTN_LBLS+Redraw );
  29.         }
  30.     }
  31.  
  32. //********************************************************************************************************************************
  33.  
  34. char FindTeamInLeague( char posn )
  35.     {
  36.         char    team    =    0;
  37.  
  38.         for ( char t=0; t < 16 ; t++ )
  39.             {
  40.                  if ( GroupDrawInfo[t]    == posn )
  41.                 {
  42.                     team    =    t;
  43.                     break;
  44.                 }            
  45.             }
  46.  
  47.         return (team);
  48.     }
  49.  
  50. //********************************************************************************************************************************
  51.  
  52. void    GroupFixturesPage( char MENU, signed char BOX )
  53.     {
  54.         if ( MENU == GROUP_FIXTURES && LogicState == RUN_FRONTEND )
  55.         {
  56.             if ( BOX == REDRAW_BOX && ButtonState != 0 )
  57.               {
  58.                 Animation_table[RedrawHandle].AnimationSpeed =
  59.                         WhichButton( ButtonState, 0.85);
  60.                 ChangeMenu    =    EURO_REDRAW;
  61.                      DeBounce      =     TRUE;
  62.               }                                     
  63.  
  64.             if ( BOX == NXT_MTCH_BOX && ButtonState != 0 )
  65.               {
  66.       
  67.             ///    tempory transfer to next match....
  68.  
  69.                 EUROteamA    =    FindTeamInLeague( Fixtures[MatchNumber].HomeTeam );
  70.                 EUROteamB    =    FindTeamInLeague( Fixtures[MatchNumber].AwayTeam );
  71.  
  72.  
  73.                 EUROteamA    =    0;
  74.                 EUROteamB    =    1;
  75.                 
  76.             ///
  77.                 Animation_table[NextMatchHandle].AnimationSpeed = 
  78.                         WhichButton( ButtonState, 0.85);
  79.                 RunMatch     =    Yes;
  80.                 ChangeMenu    =    MAIN;
  81.                      DeBounce      =     TRUE;
  82.               }                                     
  83.     
  84.         RedrawHighlight       = ControlOptionHighlight( BOX, REDRAW_BOX, REDRAWdisp_BOX, RedrawHighlight, 
  85.                      RedrawHandle, BUTN_LBLS+Redraw );
  86.         NextMatchHighlight = ControlOptionHighlight( BOX, NXT_MTCH_BOX, NXT_MTCHdisp_BOX, NextMatchHighlight,
  87.                     NextMatchHandle, BUTN_LBLS+NextMatch );
  88.         }
  89.     }               
  90.  
  91. //********************************************************************************************************************************
  92.  
  93. void CalculateLeagueTables()
  94.     {
  95.         //…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª 
  96.         //∫                                                              ∫
  97.         //∫ VERBOSE INFORMATION, DISPLAYS LEAGUE TABLE DATA IF REQUESTED ∫
  98.         //∫                                                              ∫
  99.         //»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº 
  100.  
  101.         
  102.         if ( EUROverbose != 0 )
  103.         {
  104.             printf("\n  LEAGUE TABLE CALCULATION DATA:\n\n");
  105.             printf("    Points for a win:   %d\n", WinPts);
  106.             printf("    Points for a draw:  %d\n", DrawPts);
  107.         }
  108.  
  109.  
  110.         for ( char t=0; t < 16 ; t++ )
  111.         {
  112.             LeaguePositions[t]    =    t;
  113.             LeagueTable[t].points    =    
  114.                 ((LeagueTable[t].won*WinPts) + (LeagueTable[t].drew*DrawPts));
  115.             LeagueTable[t].goalDiff    =    
  116.                 (LeagueTable[t].goalsFor-LeagueTable[t].goalsAgainst);
  117.  
  118.  
  119.         if ( EUROverbose != 0 )
  120.   
  121.             printf(" (%d)      W: %d   D: %d   L: %d   Gf: %d   Ga: %d   Pts: %d       %s\n", 
  122.                         LeaguePositions[t],
  123.                         LeagueTable[t].won, LeagueTable[t].drew, LeagueTable[t].lost,
  124.                         LeagueTable[t].goalsFor, LeagueTable[t].goalsAgainst,
  125.                         LeagueTable[t].points,    GetTEXT(TEAM_NMES+t ) );
  126.         }
  127.  
  128.  
  129.  
  130.     char    SwapTemp;
  131.  
  132.     for ( char scans = 0; scans < 16; scans++ )
  133.         {
  134.  
  135. //        for ( char group = 0; group < 4; group++ )
  136. //            {
  137.  
  138.             for ( char teama = 0; teama < 16; teama++ )
  139.                 {
  140.  
  141.                 for ( char teamb = 0; teamb < 16; teamb++ )
  142.                     {
  143.  
  144.             if ( teama != teamb && ( (GroupDrawInfo[teama] & 12) == (GroupDrawInfo[teamb] & 12)) )
  145.                  {
  146.                 
  147.  
  148.                  if ( ( LeagueTable[ ((group*4)+teama) ].points <  LeagueTable[ ((group*4)+teamb) ].points && 
  149.                   LeaguePositions[ ((group*4)+teama) ]    < LeaguePositions[ ((group*4)+teamb) ] )
  150.  
  151.                  ||    ( LeagueTable[ ((group*4)+teama) ].points == LeagueTable[ ((group*4)+teamb) ].points && 
  152.                   LeagueTable[ ((group*4)+teama) ].won <  LeagueTable[ ((group*4)+teamb) ].won && 
  153.                   LeaguePositions[ ((group*4)+teama) ]    < LeaguePositions[ ((group*4)+teamb) ] )
  154.                            
  155.                  || ( LeagueTable[ ((group*4)+teama) ].points == LeagueTable[ ((group*4)+teamb) ].points && 
  156.                   LeagueTable[ ((group*4)+teama) ].won == LeagueTable[ ((group*4)+teamb) ].won && 
  157.                   LeagueTable[ ((group*4)+teama) ].goalDiff <  LeagueTable[ ((group*4)+teamb) ].goalDiff && 
  158.                   LeaguePositions[ ((group*4)+teama) ]    < LeaguePositions[ ((group*4)+teamb) ] ) 
  159.                 ) )
  160.                             {
  161.  
  162.                             SwapTemp = LeaguePositions[ ((group*4)+teamb) ];
  163.                             LeaguePositions[ ((group*4)+teamb) ] = 
  164.                                 LeaguePositions[ ((group*4)+teama) ];
  165.                             LeaguePositions[ ((group*4)+teama) ] = 
  166.                                 SwapTemp;
  167.  
  168.                             }
  169.  
  170.                         }
  171.                     }
  172.                 }
  173. //            }
  174.         }
  175.     }
  176.  
  177. //********************************************************************************************************************************
  178.  
  179. void DisplayLeagueTables()
  180.     {    
  181.  
  182.     short team;
  183.     char  *ammount;
  184.     for ( char h=0; h < 16 ; h++ )
  185.         {
  186.             DisplayString(
  187.                 (GroupFixtureDEFN[h].xposn)-
  188.                     (PixelLengthOfString(GetTEXT( GroupFixtureDEFN[h].string), SMALL_FONT ) /2 ), 
  189.                 GroupFixtureDEFN[h].yposn,
  190.                       GetTEXT( GroupFixtureDEFN[h].string ),
  191.                 SMALL_FONT, 22, NO_BOX, 
  192.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  193.  
  194.                 team    =    (short)FindTeamInLeague(h);
  195.  
  196.                 DisplayString( 
  197.                 LeaguePosnDEFN[h].xposn,
  198.                 LeaguePosnDEFN[h].yposn,
  199.                 GetTEAMname( team, 11 ),
  200.                 SMALL_FONT, 
  201.                 LeagueColourOffsets[team], 
  202.                 NO_BOX, 
  203.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  204.  
  205.                 itoa( LeagueTable[team].won, ammount, 10);
  206.                 DisplayString( 
  207.                 WinPosnDEFN[h].xposn - 
  208.                     (PixelLengthOfString( ammount, SMALL_FONT ) /2 ), 
  209.                 WinPosnDEFN[h].yposn,
  210.                 ammount,
  211.                 SMALL_FONT, 
  212.                 15,
  213.                 NO_BOX, 
  214.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  215.  
  216.                 itoa( LeagueTable[team].drew, ammount, 10);
  217.                 DisplayString( 
  218.                 DrawPosnDEFN[h].xposn - 
  219.                     (PixelLengthOfString( ammount, SMALL_FONT ) /2 ), 
  220.                 DrawPosnDEFN[h].yposn,
  221.                 ammount,
  222.                 SMALL_FONT, 
  223.                 15,
  224.                 NO_BOX, 
  225.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  226.                 itoa( LeagueTable[team].lost, ammount, 10);
  227.                 DisplayString( 
  228.                 LosePosnDEFN[h].xposn - 
  229.                     (PixelLengthOfString( ammount, SMALL_FONT ) /2 ), 
  230.                 LosePosnDEFN[h].yposn,
  231.                 ammount,
  232.                 SMALL_FONT, 
  233.                 15,
  234.                 NO_BOX, 
  235.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  236.                 itoa( LeagueTable[team].points, ammount, 10);
  237.                 DisplayString( 
  238.                 PointsPosnDEFN[h].xposn - 
  239.                     (PixelLengthOfString( ammount, SMALL_FONT ) /2 ), 
  240.                 PointsPosnDEFN[h].yposn,
  241.                 ammount,
  242.                 SMALL_FONT, 
  243.                 15,
  244.                 NO_BOX, 
  245.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  246.         }
  247.     }
  248.  
  249. //********************************************************************************************************************************
  250.  
  251. void DisplayLeagueFixtures( char Match )
  252.     {          
  253.         char    NextMtch = Match;
  254.         char    PAL;
  255.         Match&=    (31-7);
  256.  
  257.         for ( char f=0; f < 8 ; f++ )
  258.         {
  259.  
  260.             PAL    =    22;
  261.         
  262.             if ( Match == NextMtch )
  263.     
  264.                 PAL = 15;
  265.  
  266. //            DisplayString(
  267. //                Fixtures[Match].fixXposn,
  268. //                Fixtures[Match].fixYposn,
  269. //                      GetTEAMname( (FindTeamInLeague( Fixtures[Match].HomeTeam) ) , 11),
  270. //                SMALL_FONT, 22, NO_BOX, 
  271. //                &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  272. //
  273. //            DisplayString(
  274. //                Fixtures[Match].fixXposn+210-
  275. //                        (PixelLengthOfString( 
  276. //                        GetTEAMname(
  277. //                            FindTeamInLeague( Fixtures[Match].AwayTeam ), 11 
  278. //                            ), SMALL_FONT )),
  279. //                Fixtures[Match].fixYposn,
  280. //                      GetTEAMname( (FindTeamInLeague( Fixtures[Match].HomeTeam) ) , 0),
  281. //                SMALL_FONT, 22, NO_BOX, 
  282. //                &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  283. //
  284.  
  285.  
  286.             DisplayString(
  287.                 Fixtures[Match].fixXposn-
  288.                         (PixelLengthOfString( 
  289.                         GetTEAMname(
  290.                             FindTeamInLeague( Fixtures[Match].HomeTeam ), 11 
  291.                             ), SMALL_FONT ) /2 ),
  292.                 Fixtures[Match].fixYposn,
  293.                       GetTEAMname( (FindTeamInLeague( Fixtures[Match].HomeTeam) ) , 11),
  294.                 SMALL_FONT, PAL, NO_BOX, 
  295.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  296.  
  297.             DisplayString(
  298.                 (Fixtures[Match].fixXposn+116)-
  299.                         (PixelLengthOfString( 
  300.                         GetTEAMname(
  301.                             FindTeamInLeague( Fixtures[Match].AwayTeam ), 11 
  302.                             ), SMALL_FONT ) /2 ),
  303.                 Fixtures[Match].fixYposn,
  304.                       GetTEAMname( (FindTeamInLeague( Fixtures[Match].AwayTeam) ) , 0),
  305.                 SMALL_FONT, PAL, NO_BOX, 
  306.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  307.  
  308.             Match++;
  309.         }
  310.     }
  311.  
  312. //********************************************************************************************************************************
  313.  
  314. void    DisplayVersusList()
  315.     {
  316.  
  317.     for ( char v=0; v < 8 ; v++ )
  318.         {
  319.             DisplayString(
  320.                 VersusPosnDEFN[v].xposn - 
  321.                     (PixelLengthOfString(GetTEXT( VRUS_LBLE ), SMALL_FONT ) /2 ), 
  322.                 VersusPosnDEFN[v].yposn,
  323.  
  324.                       GetTEXT( VRUS_LBLE ),
  325.                 SMALL_FONT, 22, NO_BOX, 
  326.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  327.         }
  328.  
  329.     }
  330.  
  331. //********************************************************************************************************************************
  332.  
  333.  
  334. void EuroReDraw( char MENU, signed char BOX )
  335.     {
  336.         signed char DrawnTeam, venue;
  337.  
  338.         if ( MENU == EURO_REDRAW )
  339.         {
  340.  
  341.         DefaultdrawHighlight =  ControlOptionHighlight( BOX, DEFAULT_BOX,
  342.                    DEFAULTdisp_BOX, DefaultdrawHighlight, 
  343.                     DefaultHandle, BUTN_LBLS+Default );
  344.  
  345.             if ( BOX == DEFAULT_BOX && ButtonState != 0 && LogicState == RUN_FRONTEND )
  346.               {
  347.                 memcpy( &GroupDrawInfo[0], &GroupDrawDefaultInfo[0], 16 );
  348.                 Animation_table[DefaultHandle].AnimationSpeed = 
  349.                         WhichButton( ButtonState, 0.85);
  350.                 ChangeMenu    =    GROUP_FIXTURES;
  351.                      DeBounce      =     TRUE;
  352.               }                                     
  353.  
  354.             if ( EuroReDrawCounter <= 0.0 )
  355.             {
  356.  
  357.                 if ( EuroReDrawFlag == 22 )
  358.                 {
  359.                     if ( BOX == GRP_FIX_BOX && ButtonState == LEFT_BUTTON && LogicState == RUN_FRONTEND )
  360.                       {
  361.                         Animation_table[GrpFixHandle].AnimationSpeed = 
  362.                             WhichButton( ButtonState, 0.85);
  363.                         ChangeMenu    =    GROUP_FIXTURES;
  364.                              DeBounce      =     TRUE;
  365.                       }                                     
  366.  
  367.                 RedrawdoneHighlight =  ControlOptionHighlight( BOX, GRP_FIX_BOX,
  368.                        GRP_FIXdisp_BOX, RedrawdoneHighlight, 
  369.                         GrpFixHandle, BUTN_LBLS+Done );
  370.  
  371.                 }
  372.                 
  373.                 if ( EuroReDrawFlag == 21 )
  374.                 {
  375.                     char c;
  376.                     for ( char t=0; t < 16 ; t++ )             
  377.                         {
  378.                         c         = GroupDrawInfo[t] / 4;
  379.                         GroupDrawInfo[t] = (GroupDrawInfo[t] & 3) +  (GroupVenues[c]*4);
  380.                         }                        
  381.                     EuroReDrawFlag++;
  382.  
  383.                     GrpFixHandle  =     AddAnimation( 446, 425, 
  384.                                    ( (float)WHT_BLUE_BUTTON ), ( (float)WHT_BLUE_BUTTON+11.9 ),
  385.                                     0.0, GRP_FIX_BOX, RUN_ONCE );
  386.                     Animation_table[GrpFixHandle].Counter    =    6.0;
  387.                     Animation_table[GrpFixHandle].AnimationSpeed = 0.85;
  388.                     
  389.                     RedrawdoneHighlight =  ControlOptionHighlight( -1, GRP_FIX_BOX,
  390.                            GRP_FIXdisp_BOX, RedrawdoneHighlight, 
  391.                             GrpFixHandle, BUTN_LBLS+Done );
  392.                 }
  393.  
  394.                 if ( EuroReDrawFlag > 16 && EuroReDrawFlag < 21 )
  395.                 {
  396.                     if ( GroupVenues[ (EuroReDrawFlag-17) ] != -1 )
  397.                         EuroReDrawFlag++;
  398.                     else
  399.  
  400.                     {                        
  401.                         venue    = (char)( GetRnd2() & 3 );
  402.  
  403.                         if ( GroupVenues[0] != venue &&  
  404.                              GroupVenues[1] != venue &&
  405.                              GroupVenues[2] != venue &&
  406.                              GroupVenues[3] != venue )
  407.                         {
  408.                             char    v    =    (EuroReDrawFlag-17);
  409.                             
  410.                             GroupVenues[v]  = venue;
  411.  
  412.                             CopyFromBACKtoPSEUDObuffer(
  413.                                 &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  414.                                   ReDrawHeadPosnDEFN[v].xposn-84,
  415.                                   ReDrawHeadPosnDEFN[v].yposn-5,
  416.                                 168, 28 );
  417.         
  418.                              DisplayString(
  419.                                    ReDrawHeadPosnDEFN[v].xposn-
  420.                                    ((PixelLengthOfString( GetTEXT( VNUE_NMES+(venue*2) ), 
  421.                                    SMALL_FONT )) /2),
  422.                                    ReDrawHeadPosnDEFN[v].yposn-7,
  423.                                   GetTEXT( VNUE_NMES+(venue*2) ),
  424.                                   SMALL_FONT, 
  425.                                   15,
  426.                                   NO_BOX, 
  427.                                   &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  428.  
  429.                              DisplayString(
  430.                                    ReDrawHeadPosnDEFN[v].xposn-
  431.                                    ((PixelLengthOfString( GetTEXT( VNUE_NMES+Birmingham+(venue*2) ), 
  432.                                    SMALL_FONT )) /2),
  433.                                    ReDrawHeadPosnDEFN[v].yposn+8,
  434.                                   GetTEXT( VNUE_NMES+Birmingham+(venue*2) ),
  435.                                   SMALL_FONT, 
  436.                                   15,
  437.                                   NO_BOX, 
  438.                                   &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  439.                     
  440.                             AddToDumpList( 
  441.                                   ReDrawHeadPosnDEFN[v].xposn-84,
  442.                                   ReDrawHeadPosnDEFN[v].yposn-7,
  443.                                   168, 32 );
  444.          
  445.                             EuroReDrawFlag++;
  446.                             EuroReDrawCounter    =    25;
  447.                         }
  448.  
  449.                     }
  450.  
  451.                  }
  452.  
  453.  
  454.  
  455.                 if ( EuroReDrawFlag==16 )
  456.                 {
  457.                     venue    = GroupDrawInfo[England] /4;
  458.                     EuroReDrawFlag    =    17;
  459.  
  460.                     for ( char v=0; v < 4 ; v++ )             
  461.                     {GroupVenues[v] =    -1;}
  462.  
  463.                     GroupVenues[venue] =    0;
  464.  
  465.                     CopyFromBACKtoPSEUDObuffer(
  466.                         &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  467.                           ReDrawHeadPosnDEFN[venue].xposn-84,
  468.                           ReDrawHeadPosnDEFN[venue].yposn-5,
  469.                             168, 28 );
  470.                      DisplayString(
  471.                        ReDrawHeadPosnDEFN[venue].xposn-
  472.                        ((PixelLengthOfString( GetTEXT( VNUE_NMES ), 
  473.                        SMALL_FONT )) /2),
  474.                        ReDrawHeadPosnDEFN[venue].yposn-7,
  475.                       GetTEXT( VNUE_NMES ),
  476.                       SMALL_FONT, 
  477.                       15,
  478.                       NO_BOX, 
  479.                       &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  480.  
  481.                      DisplayString(
  482.                        ReDrawHeadPosnDEFN[venue].xposn-
  483.                        ((PixelLengthOfString( GetTEXT( VNUE_NMES+Birmingham ), 
  484.                        SMALL_FONT )) /2),
  485.                        ReDrawHeadPosnDEFN[venue].yposn+8,
  486.                       GetTEXT( VNUE_NMES+Birmingham ),
  487.                       SMALL_FONT, 
  488.                       15,
  489.                       NO_BOX, 
  490.                       &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  491.             
  492.                     AddToDumpList( 
  493.                       ReDrawHeadPosnDEFN[venue].xposn-84,
  494.                       ReDrawHeadPosnDEFN[venue].yposn-7,
  495.                       168, 32 );
  496.  
  497.                     EuroReDrawCounter    =    25;
  498.                 }                    
  499.  
  500.  
  501.  
  502.                 if ( EuroReDrawFlag > 11 && EuroReDrawFlag < 16 )
  503.                 {
  504.                     DrawnTeam    =    (char)( GetRnd2() & 15);
  505.  
  506.  
  507.                     if ( (DrawnTeam == England ||        
  508.                          DrawnTeam == Spain ||
  509.                          DrawnTeam == Denmark ||
  510.                          DrawnTeam == Germany) &&
  511.                          GroupDrawInfo[DrawnTeam] == -1 )
  512.                         {
  513.                             GroupDrawInfo[DrawnTeam] = GroupDrawCode[EuroReDrawFlag];
  514.  
  515.                             DisplayString(
  516.                               ReDrawPosnDEFN[EuroReDrawFlag].xposn-
  517.                                   ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ), 
  518.                                 MEDIUM_FONT )) /2),
  519.                               ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  520.                                     GetTEAMname( DrawnTeam, 11 ),
  521.                                 MEDIUM_FONT, 
  522.                                 LeagueColourOffsets[DrawnTeam], 
  523.                                 NO_BOX, 
  524.                                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  525.  
  526.                             DisplayString(
  527.                               ReDrawPosnDEFN[EuroReDrawFlag].xposn-
  528.                                   ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ), 
  529.                                 MEDIUM_FONT )) /2),
  530.                               ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  531.                                     GetTEAMname( DrawnTeam, 11 ),
  532.                                 MEDIUM_FONT, 
  533.                                 LeagueColourOffsets[DrawnTeam], 
  534.                                 NO_BOX, 
  535.                                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  536.                                        
  537.                             AddToDumpList( 
  538.                                 ReDrawPosnDEFN[EuroReDrawFlag].xposn-84,
  539.                                 ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  540.                                 168, 20 );
  541.  
  542.                             EuroReDrawFlag++;
  543.                             EuroReDrawCounter    =    25;
  544.                         }
  545.  
  546.  
  547.  
  548.                 }
  549.  
  550.     
  551.                 if ( EuroReDrawFlag > -1 && EuroReDrawFlag < 12 )
  552.                 {
  553.                     DrawnTeam    =    (char)( GetRnd2() & 15);
  554.                     
  555.                     if ( DrawnTeam != England &&            
  556.                          DrawnTeam != Spain &&
  557.                          DrawnTeam != Denmark &&
  558.                          DrawnTeam != Germany &&
  559.                          GroupDrawInfo[DrawnTeam] == -1 )
  560.                         {
  561.                             GroupDrawInfo[DrawnTeam] = GroupDrawCode[EuroReDrawFlag];
  562.  
  563.                             DisplayString(
  564.                                   ReDrawPosnDEFN[EuroReDrawFlag].xposn-
  565.                                   ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ), 
  566.                                 MEDIUM_FONT )) /2),
  567.                                   ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  568.                                   GetTEAMname( DrawnTeam, 11 ),
  569.                                 MEDIUM_FONT, 
  570.                                 LeagueColourOffsets[DrawnTeam], 
  571.                                 NO_BOX, 
  572.                                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  573.  
  574.                             DisplayString(
  575.                                   ReDrawPosnDEFN[EuroReDrawFlag].xposn-
  576.                                   ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ), 
  577.                                 MEDIUM_FONT )) /2),
  578.                                   ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  579.                                   GetTEAMname( DrawnTeam, 11 ),
  580.                                 MEDIUM_FONT, 
  581.                                 LeagueColourOffsets[DrawnTeam], 
  582.                                 NO_BOX, 
  583.                                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  584.  
  585.                             AddToDumpList( 
  586.                                 ReDrawPosnDEFN[EuroReDrawFlag].xposn-84,
  587.                                 ReDrawPosnDEFN[EuroReDrawFlag].yposn,
  588.                                 168, 20 );
  589.  
  590.                             EuroReDrawFlag++;
  591.                             EuroReDrawCounter    =    25;
  592.                         }
  593.                 }
  594.     
  595.  
  596.                 if ( EuroReDrawFlag == -1 )
  597.                 {
  598.                     for ( char r=0; r < 16 ; r++ )             
  599.                     {GroupDrawInfo[r]    =    -1;}
  600.                     EuroReDrawFlag        =    0;
  601.                     EuroReDrawCounter    =    25;
  602.                 }
  603.             }
  604.  
  605.             if ( EuroReDrawCounter > 0.0 )
  606.                 EuroReDrawCounter-=    1.85;
  607.  
  608.  
  609.         }
  610.     }
  611.  
  612. //********************************************************************************************************************************
  613.  
  614. void DisplayGroupHeadings()
  615.     {                
  616.         for ( char h=0; h < 4 ; h++ )             
  617.         {
  618.            DisplayString(
  619.                ReDrawHeadPosnDEFN[h].xposn-
  620.                ((PixelLengthOfString( GetTEXT( DRGR_LBLE+h ), 
  621.                MEDIUM_FONT )) /2),
  622.                ReDrawHeadPosnDEFN[h].yposn,
  623.               GetTEXT( DRGR_LBLE+h ),
  624.               MEDIUM_FONT, 
  625.               29,
  626.               NO_BOX, 
  627.               &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  628.  
  629.           AddToDumpList( 
  630.               ReDrawHeadPosnDEFN[h].xposn-84,
  631.               ReDrawHeadPosnDEFN[h].yposn,
  632.               168, 20 );
  633.  
  634.         }
  635.     }
  636.  
  637. //********************************************************************************************************************************
  638.